<?php 
include '../operations/connection.php';
$idmemo = $_REQUEST['idmemo'];
$action = $_REQUEST['action'];
$newlang = $_REQUEST['newlang'];

if ($_REQUEST['newlang'] == "EN") {
	include "../value/value_en.php";
} else if($_REQUEST['newlang'] == "VN") {
	include "../value/value_vn.php";
}
else {
	include "../value/value_kr.php";
}

 if ($action=='edit'){
	$sqledit ="SELECT * FROM list_memo WHERE IDMemo = '$idmemo';";
	$result = mysql_fetch_assoc(mysql_query($sqledit));
	$title = $result[Title];
	$content = $result[Content];
}else{
	$title ="";
	$content ="";
}
?>



<div style="margin-left: 5px;">
	<div style="height: 10px;"></div>
	<form action="content-private-memo/process-add-privatememo-user.php" method="get">
	<input type="hidden" name='idmemo' value="<?=$idmemo?>" />
	<input type="hidden" name='action' value="<?=$action?>" />
	<div class="navigation-button" style="background-color: #eef1f3;">
		<a href="privatememo.php"><img src="images/back-admin.png" /> </a>
		<div><?php echo $l_back?></div>
	</div>
	
	<div class="navigation-button" style="background-color: #eef1f3;">
			<a href=""><input type="submit" name="save" id="save" value=""
				style="background: url('images/save-admin.png') no-repeat 40px center;
				 width: 100px; height: 30px;border-bottom: none;border-right: none;cursor: pointer;"></a>
				  <div><?php echo $l_save?></div>
		</div>
	<div class="navigation-button" style="background-color: #eef1f3;">
		<a id="preview" ><img src="images/view.png" /> </a>
		<div><?php echo $l_preview?></div>
	</div>
	<br style="clear: both" /> <br />

	
		<table class="new-board" width="100%" cellspacing="5" cellpadding="5">
			<tr>
				<td><?php echo $l_title?><br /> <input id="title" name="title" type="text" value="<?php echo $title?>"
					style="width: 100%;height: 19px;height: 22px;line-height: 22px;" />
				</td>
			</tr>
			<tr>
				<td><?php echo $l_content?><br /> <textarea rows="" cols="" id="ncontent"
						class="ncontent" name="ncontent" style="width: 100%"><?php echo $content?></textarea>
				</td>

			</tr>
		</table>
	</form>
</div>
<?php mysql_close($connection);?>
